from rest_framework import serializers
from .models import Reagent

class ReagentSerializer(serializers.ModelSerializer):
    reagentName = serializers.SerializerMethodField(
        source='reagent.name',
    )
    class Meta:
        model = Reagent
        fields = '__all__'
    def get_reagentName(self, obj):
        return obj.name
